#include <iostream>
#include <sstream>
#include <SFML/Graphics/RenderWindow.hpp>
#include <nice2d/macros.h>
#include <nice2d/scene.h>
#include <nice2d/sprite.h>
#include <nice2d/background.h>

class UnitScene : public Scene
{
public:
    void onInitialed()override
    {
        setBackground(Background::create(sf::Color::Green));
        setSceneBox({0.0f, 0.0f, 800.0f, 600.0f});

        auto sprite = std::make_shared<Sprite>();
        sprite->setSize(64.0f, 64.0f);
        sprite->setBackgroundColor(sf::Color::Transparent);
        sprite->setSpriteColor(sf::Color::Red);
        sprite->addSpriteImage("./../data/icon/nato/units/infantry.png");
        sprite->addSpriteImage("./../data/icon/nato/sizes/division.png");
        sprite->setCenter(400.0f, 300.0f);
        addChild(sprite);
    }
private:
};

DECLARE_MAIN_FUNCTION_WITH_SCENE(800, 600, "unit06", UnitScene)
